#include "WindowClass.h"

WindowClass::WindowClass(HINSTANCE pHInstance) {
	windowClass = new WNDCLASSEX();
	ZeroMemory(windowClass, sizeof(WNDCLASSEX));
	windowClass->cbSize			= sizeof(WNDCLASSEX);
	windowClass->style			= CS_HREDRAW | CS_VREDRAW;
	windowClass->lpfnWndProc	= WindowOperations::windowCallbackProcedure;
	windowClass->cbClsExtra		= 0;
	windowClass->cbWndExtra		= 0;
	windowClass->hInstance		= pHInstance;
	windowClass->hIcon			= LoadIcon(NULL, IDI_APPLICATION);
	windowClass->hCursor		= LoadCursor(NULL, IDC_ARROW);
	windowClass->hbrBackground	= (HBRUSH)(COLOR_WINDOW + 1);
	windowClass->lpszMenuName	= NULL;
	windowClass->lpszClassName	= TurnsDataModel::WINDOW_CLASS_NAME;
	windowClass->hIconSm		= LoadIcon(NULL, IDI_APPLICATION);
}

WindowClass::~WindowClass() {
	delete windowClass;
}

WNDCLASSEX * WindowClass::getWindowClass() {
	return windowClass;
}
